package txt;

import sf.tools.IOUtils;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;

public class FileReplace {

    public static void main(String[] args) throws IOException {
        IOUtils.asStringLambda(
                new BufferedReader(new InputStreamReader(new FileInputStream(new File("D:\\workspace\\DCloud-oms\\Trunk\\oms-web\\src\\main\\resources\\i18n\\ValidationMessages_zh_CN.properties")),
                        "UTF-8")),
                true, s -> {
                    int index = s.indexOf("=");
                    if (index > 0) {
//                        s = s.substring(0, index);
                        s = s.substring(index + 1, s.length());
                        System.out.println(s);
                    }
                    return true;
                });
    }

}
